<template>
	<div class="success">
		<van-nav-bar title="购买成功" @click-left="onClickLeft">
			<template #left>
				<van-icon name="cross" color="#aaa" size="20"  />
			</template>
		</van-nav-bar>
		<img src="../../../public/images/gou.svg" class="image_215X1">
		<p class="text_927X1">购买成功</p>
		<p class="text_928X1">{{ BuyNumber.totalValue }}杯已放入您的咖啡钱包</p>
		<van-cell title="塞进红包，与好友分享 >" @click="goSendRedPacket" class="text_940X1" />
		<van-button type="default" size="14" class="text_941X1" @click="goCoffeeWallet">查看我的咖啡钱包</van-button>
		<van-button type="default" color="rgba(136, 175, 213, 1)" size="14" @click="goMenu">去喝一杯</van-button>
	</div>
</template>

<script setup>
import { useRouter } from 'vue-router'
import { useBuyNumber } from '@/store/discountCoupon.js'
const BuyNumber = useBuyNumber()
const router = useRouter()
// 跳到充赠优惠
const onClickLeft = () => router.push('topupwallet')
// 跳转到 我的-->咖啡钱包
const goCoffeeWallet = () => router.push('coffeewallet')
// 跳转到菜单(选择咖啡和小食)
const goMenu = () => router.push('goodsList')
// 跳转到发送红包（选择咖啡）
const goSendRedPacket = () => router.push('redpacket')




</script>

<style lang="scss" scoped>
.success {
	background-color: #fff;
	height: 100vh;
.van-nav-bar {
	width: 375px;
	height: 44px;
	top: 20px;
	color: rgba(56, 56, 56, 1);
	background-color: rgba(255, 255, 255, 1);
	font-size: 18px;
	line-height: 150%;
	text-align: center;
	font-weight: bold;
	border-bottom: 1px solid rgba(242, 242, 242, 1);
}

.image_215X1 {
	width: 86px;
	height: 86px;
	margin-left: 145px;
	margin-top: 80px;
}

.text_927X1 {
	width: 112px;
	height: 42px;
	margin-left: 132px;
	margin-top: 20px;
	color: rgba(80, 80, 80, 1);
	font-size: 28px;
	line-height: 150%;
	text-align: left;
}

.text_928X1 {
	width: 170px;
	height: 24px;
	margin-left: 108px;
	margin-top: 25px;
	color: rgba(80, 80, 80, 1);
	font-size: 16px;
	line-height: 150%;
	text-align: left;
}

.text_940X1 {
	width: 300px;
	height: 40px;
	margin-left: 100px;
	margin-top: 15px;
	color: rgba(136, 175, 213, 1);
	font-size: 14px;
	line-height: 150%;
	text-align: left;
}

.text_941X1 {
	color: rgba(136, 175, 213, 1);
	box-shadow: rgba(136, 175, 213, 1) solid 1px;
	border-radius: 4px;
	line-height: 150%;
	text-align: center;
}

.van-button {
	width: 155px;
	height: 50px;
	margin-left: 20px;
	margin-top: 40px;
	font-size: 14px;
}
}

</style>